from rest_framework import serializers

from app.models import FMUser
from app.models.wish_product import WishProduct


class WishProductSerializer(serializers.ModelSerializer):
    user = serializers.PrimaryKeyRelatedField(queryset=FMUser.objects.all(), required=False)

    # brand = serializers.CharField(required=False)
    # spec = serializers.CharField(required=False)
    # price = serializers.IntegerField(required=False)
    # remark = serializers.CharField(required=False)

    class Meta:
        model = WishProduct
        fields = ['user', 'category', 'name', 'contact',
                  'brand', 'spec', 'price', 'remark']
